#define _CRT_SECURE_NO_WARNINGS 1

#include"vector.h"
using namespace std;

namespace zjx
{
	void test1()
	{
		zjx::vector<int> v;
		v.push_back(1);
		v.push_back(2);
		v.push_back(3);
		v.push_back(4);
		v.push_back(5);
		for (const auto& e : v)
		{
			cout << e << " ";
		}
		cout << endl;

		zjx::vector<int> v2(v.begin(), v.end() - 2);
		//zjx::vector<int> v2(v);
		for (const auto& e : v2)
		{
			cout << e << " ";
		}
		cout << endl;

		v2 = v;
		for (const auto& e : v)
		{
			cout << e << " ";
		}
		cout << endl;

		v.insert(v.begin(), 10);
		for (const auto& e : v)
		{
			cout << e << " ";
		}
		cout << endl;

		v.erase(v.begin());
		v.erase(v.begin()+2);
		for (const auto& e : v)
		{
			cout << e << " ";
		}
		cout << endl;

		v.resize(10, 3);
		for (const auto& e : v)
		{
			cout << e << " ";
		}
		cout << endl;
		v.resize(4);
		for (const auto& e : v)
		{
			cout << e << " ";
		}
		cout << endl;
		v.resize(15,10);
		for (const auto& e : v)
		{
			cout << e << " ";
		}
		cout << endl;

	}
}

int main()
{
	zjx::test1();
	return 0;
}